package cn.trs.common.enums;

import cn.trs.common.annotation.EnumName;
import com.baomidou.mybatisplus.annotation.EnumValue;

/**
 * @version 1.0
 * @author:TRS
 * @create:2024/7/17 15:47
 * @description:
 * @ClassName: BehaviorDataTypeEnum
 * @company TRS
 */
public enum BehaviorDataTypeEnum {

    // ========== 消息行为 10-19 ==========
    MsgRecommend(10, "消息推荐行为"),
    MsgVoiceToken(12, "消息语音token"),
    MsgCancelRecommend(13, "消息取消推荐行为"),
    MsgNewSend(14, "消息重构发送行为"),
    AgentPreviewMsgSend(15, "智能体预览消息发送行为"),

    // ========== 会话行为 20-29 ==========


    // ========== 智能体行为 30-39 ==========
    BotPortrait(31, "智能体画像"),


    // ========== 租户行为 40-49 ==========
    TenantPortrait(42, "租户画像"),
    TenantKnowledgeToken(43, "租户知识库消耗"),

    // ========== 技能行为 50-59 ==========
    SkillPortrait(51, "技能画像"),
    ;

    @EnumValue
    private final Integer type;

    @EnumName
    private final String desc;

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    BehaviorDataTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static BehaviorDataTypeEnum getByType(Integer type) {
        BehaviorDataTypeEnum[] values = BehaviorDataTypeEnum.values();
        for (BehaviorDataTypeEnum value : values) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }

}
